import numpy as np

def apply_local_search(new_population, problem_type, problem_params, elite_size, ls_intensity):
    
    if problem_type == 'tsp':
        # 导入TSP特定的局部搜索应用函数
        from problems.TSP.local_search_applications import tsp_apply_local_search
        return tsp_apply_local_search(new_population, problem_params, elite_size, ls_intensity)
    # 可以添加其他问题类型的处理
    # elif problem_type == 'vrp':
    #   from problems.vrp.local_search_applications import vrp_apply_local_search
    #   return vrp_apply_local_search(...)
    else:
        return new_population